import Vue from 'vue'
import Router from 'vue-router'

import login from '@/components/login'
import home from '@/components/home'
import welcome from '@/components/welcome/index'
import user from '@/components/user/index'
import group from '@/components/group/index'
import group_detail from '@/components/group/detail'
import permission from '@/components/permission/index'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    redirect: '/login'
  }, {
    path: '/login',
    component: login,
  }, {
    path: '/home',
    component: home,
    children: [
      // 欢迎界面
      {
        path: '/welcome',
        component: welcome
      },
      //用户信息管理
      {
        path: '/user',
        component: user
      },
      // 用户组信息管理
      {
        path: '/group',
        component: group,
      },
      {
        path: '/group/detail',
        component: group_detail,
      },
      // 用户权限管理
      {
        path: '/permission',
        component: permission
      },
    ]
  }]

})
